package com.masterclient.app.widget;

import android.content.Context;
import android.support.v7.widget.GridLayoutManager;

/**
 * 作者：sean
 * 创建时间：2017/12/13 22:56
 * 功能说明：
 */

public class CustomerGridlayoutManager extends GridLayoutManager{
    private boolean isScrollEnabled = true;
    public CustomerGridlayoutManager(Context context, int spanCount) {
        super(context, spanCount);
    }

    public void setScrollEnabled(boolean flag) {
        this.isScrollEnabled = flag;
    }

    @Override
    public boolean canScrollVertically() {
        //Similarly you can customize "canScrollHorizontally()" for managing horizontal scroll
        return isScrollEnabled && super.canScrollVertically();
    }

}
